<?php if(!defined('HDPHP_PATH'))exit;C('SHOW_NOTICE',FALSE);?>

<link rel="stylesheet" type="text/css" href="http://localhost/YouHuoShop/Static/Index/style/topNav.css"/>

<!---------------顶部logo区域开始--------------->
<div id="topLogo">
</div>
<!---------------顶部logo结束------------------->
<a href="#memBox" id="toTop"><span class="glyphicon glyphicon-menu-up"></span></a>

<!---------------顶部会员消息区域开始------------>
<div id="memBox">
	<div id="mem">
		<div class="left">
			<a href="<?php echo U('Index/index');?>"><p>YOHO!有货</p></a>
		</div>
		<div class="right">
			<ul>
				<p>
					    <?php if(isset($hd['session']['uid'])&&isset($hd['session']['uname'])){ ?>
						<a href="<?php echo U('User/index',array('uid'=>$_SESSION['uid']));?>">Hi~<?php echo $hd['session']['uname'];?></a>
						<a href="<?php echo U('Member/out');?>">退出</a>
					<?php }else{ ?>
						<a href="<?php echo U('Member/login');?>">[请登录]</a>
						<a href="<?php echo U('Member/register');?>">[免费注册] </a>|
					<?php } ?>
				</p>
				<li><a href="">MY有货</a>|</li>
				<li><a href="">我的订单</a>|</li>
				<li><a href="">我的收藏</a>|</li>
				<li><a href="">消息</a>|</li>
				<li class="mob">
					<a href="">手机版</a>
					<div class="code">
						<div class="codeImg"></div>
						<h3 class="codeWords">扫描二维码</h3>
						<h3 class="codeWords">下载有货手机客户端</h3>
						<a href="">更多客户端下载</a>
					</div>
				</li>
			</ul>
		</div>
	</div>
</div>
<!---------------顶部会员消息区域结束------------>


<!---------------顶部导航搜索区域开始 ----------->

<div id="navSearchBox">
	<!--导航、二级菜单开始-->
	<div class="navSearch">
		<ul class="navCate">
			<!--<li class="checked">
				<p><a class="titleC" href="">男生</a></p>
				<p><a class="titleE" href="">BOYS</a></p>
			</li>
			<li>
				<p><a class="titleC" href="">女生</a></p>
				<p><a class="titleE" href="">GIRLS</a></p>
			</li>
			<li>
				<p><a class="titleC" href="">创意生活</a></p>
				<p><a class="titleE" href="">LIFE STYLE</a></p>
			</li>-->
		</ul>
	</div>	
	<div class="navBg">
		<div class="nav show">
			<ul class="navCate">
				<li class="fst"><a class="Cate" href="">新品到着</a></li>
				<li><a class="Cate" href="">品牌一览</a></li>
				<?php foreach ($navCate as $tk=>$t){?>
					<li>
						<a class="Cate" href="<?php echo U('list/index',array('cid'=>$tk));?>"><?php echo $t['cname'];?></a>
						<div class="cateBox">
							<div class="cateAll">
								<div class="sonCate ">
									<?php $i=0; ?>
									<?php foreach ($t['son'] as $ck=>$c){?>
										<p class="cateTitle"><a href="<?php echo U('list/index',array('cid'=>$c['cid']));?>"><?php echo $c['cname'];?></a></p>
										<?php $j=0;?>
										<?php foreach ($c['sec'] as $sk=>$s){?>
											<!--标签加class="hot"变红-->
											<p><a     <?php if($sk%3==0){ ?>class="hot" <?php } ?>href="<?php echo U('list/index',array('cid'=>$s['cid']));?>"><?php echo $s['cname'];?></a></p>
											<?php $i++; ?>
										    <?php if($i%7==0){ ?>
											</div>
											<div class="sonCate noF">
										<?php } ?>
										<?php
											$j++;
											if($j>3){ break; }
										?>
										<?php }?>
									<?php }?>
								</div>
								
								<div class="cateImg">
									<img src="http://localhost/YouHuoShop/Static/Index/images/cate.jpg" alt="" />
									<a href="">IN季新品全面开售</a>
								</div>
							</div>
						</div>
					</li>
				<?php }?>
			</ul>
		</div>
	</div>
	<!--导航、二级菜单结束-->
	
	<!--图片logo-->
	<a class="logo" href="http://localhost/YouHuoShop"><img src="http://localhost/YouHuoShop/Static/Index/images/logo_e.png" alt="" /></a>
	<!--搜索区域-->
	<div class="search">
		<form action="" method="post">
			<input class="words" name="words" type="text" />
			<input type="submit" class="sub" value="" />
		</form>
		<!--购物车-->
		<div class="car">
			<a href="" class=""><img src="http://localhost/YouHuoShop/Static/Index/images/car.png"/></a>
			<a href="" class="carBg">    <?php if(isset($_SESSION['cart'])){ ?><?php echo $_SESSION['cart']['total_rows'];?><?php }else{ ?>0<?php } ?></a>
		</div>
		<div class="shopping">
			<a href="javascript:;" class="close"><span class=" glyphicon glyphicon-remove"></span></a>
			    <?php if(!isset($_SESSION['cart'])){ ?>
				<ul class="emptyCar">
					<img src="http://localhost/YouHuoShop/Static/Index/images/car/empty_car.png" alt="" />
					<h3>您的购物车暂无商品</h3>
				</ul>
			<?php } ?>
			<!--购物车内的商品是li-->
				<ul>
			<?php foreach ($_SESSION['cart']['goods'] as $k=>$g){?>
					<li>
						<img src="http://localhost/YouHuoShop/<?php echo $g['thumb'];?>" alt="" />
						<a class="goodsName" href=""><?php echo mb_substr($g['name'],0,22,'utf-8');?></a>
						<p>
							<?php foreach ($g['options'] as $ok=>$o){?>
								<span class="size"><?php echo $ok;?>：<?php echo $o;?></span>
							<?php }?>
						</p>
						<span class="price">￥<?php echo $g['price'];?> * <?php echo $g['num'];?></span>
						<a href="" class="del">删除</a>
					</li>
			<?php }?>
					<a href="<?php echo U('confirmOrder/index');?>" class="toShopping">去购物车结算</a>
				</ul>
		</div>
	</div>
</div>
<!---------------顶部导航搜索区域结束 ----------->
